﻿using System;
using System.Collections.Generic;

namespace DYJ5._6_02
{
    class Program
    {
//4.	分拣奇偶数 int[]{1,2,3,4,5,6,7,8,9}
        static void Main(string[] args)
        {
            List<int> listA = new List<int>(new int[] { 1,2,3,4,5,6,7,8,9});
            List<int> listB = new List<int>();
            List<int> listC = new List<int>();
            for (int i = 0; i < listA.Count; i++)
            {
                if (listA[i] % 2 == 1)
                {
                        listB.Add(listA[i]);                    
                }
                else
                {
                        listC.Add(listA[i]);                   
                }
            }
            Console.WriteLine(string.Join(" ",listB));
            Console.WriteLine(string.Join(" ", listC));
        }
    }
}
